package chapter11;

/**
 * Created by VIC on 2017/1/25.
 */
public class StackTest {
    public static void main(String[] args) {
        Stack<String> stack = new Stack<String>();
        for(String s : "My dog has fleas".split(" ")) {
            stack.push(s);
        }

        while(!stack.empty()) {
            System.out.print(stack.pop() + " ");
        }
    }
}
